#!/bin/bash
set -e

cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
export readonly ARCH=${1:-amd64}
export readonly NAME=${2:-$(basename "${PWD%/*}")}
export readonly VERSION=${3:-$(basename "$PWD")}

repo_url="https://operator.min.io/"
repo_name="minio"
chart_name="minio/operator"

helm repo add ${repo_name} ${repo_url}
helm pull ${chart_name} --version=${VERSION#v} -d charts --untar

mkdir -p images/shim
echo "minio/minio:RELEASE.2024-02-26T09-33-48Z" > images/shim/minioImages
